﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T4
{
    public class Enemy
    {
        string _name;
        int _blood;
        int _rank;

        public string Name { set; get; }
        public int Blood { set; get; }
        public int Rank { set; get; }

        //无参构造函数
        public Enemy() {
            Blood = 100;
            Rank = 1;
        }

        //有参构造函数
        public Enemy(string s) {
            Name = s;
        }
        
        //普通方法
        public void Call() {
            Console.WriteLine("此路是我开，哪里走！");
        }

        //虚方法
        public virtual void Attack() {
            Console.WriteLine("我发起了普通攻击");
        }
    }
}
